package seanGahaganProject5Part3;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class JamesBond {

	public static Boolean bondRegex(String input){
		Pattern p = Pattern.compile("(\\d*)" + "[(]" + "(1*|2*|3*|4*|5*|6*|7*|8*|9*|[001]|[002]|[003]|[004]|[005]|[006]|[008]|[009])*"+ "(007)" + "[^)]*" +"[)]" + "[^~]*");
		 Matcher m = p.matcher(input);
		 boolean b = m.matches();
		return b;
		//"(1*|2*|3*|4*|5*|6*|7*|8*|9*|[001]|[002]|[003]|[004]|[005]|[006]|[008]|[009])*"		
	}
}
